#ifndef EDGE_DETECTION_SAMPLE_H
#define EDGE_DETECTION_SAMPLE_H
#include "SampleBase.h"
#include "glslprogram.h"
#include "plane.h"
#include "Quad.h"
#include "objmesh.h"
namespace ShaderLab {
	class EdgeDetectionSample : public SampleBase {
	public:
		EdgeDetectionSample();
		~EdgeDetectionSample();

		void Init();
		void Update(float time);
		void Render();
		void Imgui();
		void ShutDown();
	private:
		void CreateShader();
		void Pass1();
		void Pass2();
		void FBO();
	private:
		GLSLProgram program;
		std::unique_ptr<ObjMesh> mesh;
		std::unique_ptr<Plane> floor;
		std::unique_ptr<Quad> quad;
		GLuint fsQuad, fboHandle, renderTex;
		glm::mat4 model, view, projection;
		float edgeThreshold;
	};
}
#endif // !TEMPLATE_SAMPLE_H
